package config

import scala.util.parsing.json.JSON

trait MyJson {

  implicit class myJson(json: String) {

    def getJson = {
      JSON.parseFull(json).get
    }

    def jsonToMap: Map[String, String] = {
      getJson.asInstanceOf[Map[String, String]]
    }

    def jsonToMapSeq: Seq[Map[String, String]] = {
      getJson.asInstanceOf[Seq[Map[String, String]]]
    }

    def jsonToMapDouble: Map[String, Double] = {
      getJson.asInstanceOf[Map[String, Double]]
    }
  }

}
